package com.xgg.taiwuinfo.gongfa.abilities;

import android.content.Context;

//移动身法加成，身法数，持续时间
public class Ability_Shenfa_Bonus {

    double mCastTime;       //施法时间
    int mCastCost;          //施法用身法点数
    double mPointLast;       //单身法点持续时间
    int mPoints;            //生成身法点数

    int MoveInterval;
    int MoveIntervalFahui;
    int MoveDistance;
    int MoveDistanceFahui;

    public int getCastCost() { return mCastCost; }
    public double getCastTime() { return mCastTime; }
    public int getPointNum() { return  mPoints; }
    public double getPointLast() { return  mPointLast; }

    public Ability_Shenfa_Bonus(double casttime , int castcost, double pointlast, int points, int moveinterval , int moveintervalfahui, int movedistance, int movedistancefahui)
    {
        mCastCost = castcost;
        mCastTime = casttime;
        mPointLast = pointlast;
        mPoints = points;
        MoveDistance = movedistance;
        MoveDistanceFahui = movedistancefahui;
        MoveInterval = moveinterval;
        MoveIntervalFahui = moveintervalfahui;
    }

    public String getCastEffectString(Context ctx)
    {
        String rt = "";
        if (MoveInterval !=  0) { String str = String.format("移动速度: +%.02f\r\n" , (double)MoveInterval / 100.0); rt += str;}
        if (MoveIntervalFahui !=  0) { String str = String.format("移动速度发挥: +%d%%\r\n" , MoveIntervalFahui); rt += str;}
        if (MoveDistance !=  0) { String str = String.format("移动距离: +%.02f\r\n" , (double)MoveDistance / 100.0); rt += str;}
        if (MoveDistanceFahui !=  0) { String str = String.format("移动距离发挥: +%d%%\r\n" , MoveDistanceFahui); rt += str;}
        return rt;
    }

}
